<template>
  <div>
    <h2>{{ $store.state.age }}</h2>
    <h2>{{ $store.getters.a }}</h2>
    <button @click="$store.commit('updatestate', 1)">muations修改age</button>
    <button @click="$store.dispatch('updateAgeAfter', 2)">
      actions修改age
    </button>
    <button @click="$store.state.age++">直接修改age</button>
    <hr />
    <my-test></my-test>
  </div>
</template>

<script>
import MyTest from './components/MyTest.vue'
export default {
  components: { MyTest }
}
</script>

<style></style>
